import math

class Calculate(object):
    def add(self,a,b):
        return a+b

    @staticmethod
    def add1(a,b):
        return a+b

print(Calculate().add(1,2))    #需要实例方法进行调用
print(Calculate.add1(3,4))    #不需要实例方法，可通过类名直接调用

class Dog(object):
    name='哈士奇'
    __nation='中国'

    def __init__(self):
        self.fer = '短毛'
        self.__color = 'yellow'
        self.__nation = '韩国'
        self.name='柯基'

    def __str__(self):
        return(f'这是一只{Dog.name}——--我是分割线---{Dog.__nation},{self.fer},{self.__color},{self.__nation},{self.name}。')

print(Dog.name)
print(Dog._Dog__nation)
print(Dog().fer)
print(Dog()._Dog__color)
print(Dog()._Dog__nation)
print(Dog().name)
print(Dog())